#ifndef __kraw__quad_h__
#define __kraw__quad_h__
/**
*/

namespace kraw
{
    class Quad {
    public:
        Quad() {}
        
        Quad(float width, float height, float texx = 1.f, float texy = 1.f)
        {
            set(width, height, texx, texy);
        }
        
        void set(float width, float height, float texx = 1.f, float texy = 1.f)
        {
            pos[0] = 0;     pos[1] = 0;
            pos[2] = width; pos[3] = 0;
            pos[4] = 0;     pos[5] = height;
            pos[6] = width; pos[7] = height;
            
            uv0[0] = 0;     uv0[1] = texy;
            uv0[2] = texx;  uv0[3] = texy;
            uv0[4] = 0;     uv0[5] = 0;
            uv0[6] = texx;  uv0[7] = 0;
        }
        
        float* coords() { return pos; }
        float* texCoords() { return uv0; }
        
    private:
        float pos[8];
        float uv0[8];
    };
}

#endif
